# encoding=utf8
import sys
reload(sys)
sys.setdefaultencoding('utf8')

class JT_1206:
    result=[]
    analysisDescription=['应答流水号：','结果：']
    analysis1206Length=[2,1]

    def LogicAisle(self, protocolStr, header):
        count=0
        s = protocolStr[count:(count+self.analysis1206Length[0]*2)]
        header.append(self.analysisDescription[0] + s + "\n")
        count +=self.analysis1206Length[0]*2

        s= protocolStr[count:count+self.analysis1206Length[1]*2]
        print(s)
        if s == "00":
            header.append(self.analysisDescription[1] + s + " 成功" + "\n")
        elif s == "01":
            header.append(self.analysisDescription[1] + s + " 失败" + "\n")
        count += self.analysis1206Length[1]*2
        
        self.result = header
